import request from '@/util/request.js';

/**
 * @description 商家活动列表
 * @param {Object} data
 */
export function getUserBusinessList(data) {
	return request({
		url: '/business/getUserBusinessList',
		method: 'GET',
		data
	})
}
/**
 * @description 商家详情
 * @param {Object} data
 */
export function getUserBusinessById(data) {
	return request({
		url: '/business/getUserBusinessById',
		method: 'GET',
		data
	})
}
/**
 * @description 查询此商家活动
 * @param {Object} data
 */
export function getBusinessActivity(data) {
	return request({
		url: '/businessActivity/getBusinessActivity',
		method: 'GET',
		data
	})
}
/**
 * @description 活动详情
 * @param {Object} data
 */
export function getActivityById(data) {
	return request({
		url: '/activity/getActivityById',
		method: 'GET',
		data
	})
}
/**
 * @description 根据类型获取评论列表
 * @param {Object} data
 */
export function getCommentByTypeList(data) {
	return request({
		url: '/comment/getCommentByTypeList',
		method: 'GET',
		data
	})
}
/**
 * @description 用户收藏商家
 * @param {Object} data
 */
export function addUserBusiness(data) {
	return request({
		url: '/userBusiness/addUserBusiness',
		method: 'post',
		data
	})
}
/**
 * @description 用户取消此商家收藏
 * @param {Object} data
 */
export function userStopBusiness(data) {
	return request({
		url: '/userBusiness/userStopBusiness',
		method: 'post',
		data
	})
}
/**
 * @description 用户新增评论
 * @param {Object} data
 */
export function userAddComment(data) {
	return request({
		url: '/comment/userAddComment',
		method: 'post',
		data
	})
}

/**
 * @description 用户新增消费多少送多少的评论
 * @param {Object} data
 */
export function commentConsumptionOrder(data) {
	return request({
		url: '/consumptionOrder/commentConsumptionOrder',
		method: 'post',
		data
	})
}

/**
 * @description 用户评论上传文件
 * @param {Object} data
 */
export function userCommentUpload(data) {
	return request({
		url: '/file/userCommentUpload',
		method: 'post',
		data
	})
}
/**
 * @description 立即抢购活动
 * @param {Object} data
 */
export function buyNowActivity(data) {
	return request({
		url: '/activity/buyNowActivity',
		method: 'post',
		data
	})
}
/**
 * @description 用户查询活动商品订单
 * @param {Object} data
 */
export function getUserOrderList(data) {
	return request({
		url: '/order/getUserOrderList',
		method: 'GET',
		data
	})
}
/**
 * @description 用户取消订单
 * @param {Object} data
 */
export function userCancelOrder(data) {
	return request({
		url: '/order/userCancelOrder',
		method: 'post',
		data
	})
}
/**
 * @description 用户取消订单原因
 * @param {Object} data
 */
export function getOrderReasonApi(data) {
	return request({
		url: '/common/getOrderReason',
		method: 'get',
		data
	})
}
/**
 * @description 查询此用户收藏商家
 * @param {Object} data
 */
export function getUserBusiness(data) {
	return request({
		url: '/userBusiness/getUserBusiness',
		method: 'GET',
		data
	})
}